/*
 * DRACOON API
 * REST Web Services for DRACOON<br><br>This page provides an overview of all available and documented DRACOON APIs, which are grouped by tags.<br>Each tag provides a collection of APIs that are intended for a specific area of the DRACOON.<br><br><a title='Developer Information' href='https://developer.dracoon.com'>Developer Information</a>&emsp;&emsp;<a title='Get SDKs on GitHub' href='https://github.com/dracoon'>Get SDKs on GitHub</a><br><br><a title='Terms of service' href='https://www.dracoon.com/terms/general-terms-and-conditions/'>Terms of service</a>
 *
 * OpenAPI spec version: 4.45.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package ch.cyberduck.core.sds.io.swagger.client.model;

import java.util.Objects;
import java.util.Arrays;
import ch.cyberduck.core.sds.io.swagger.client.model.FileKey;
import ch.cyberduck.core.sds.io.swagger.client.model.PrivateKeyContainer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import org.joda.time.DateTime;
/**
 * Download Share information
 */
@Schema(description = "Download Share information")

public class PublicDownloadShare {
  @JsonProperty("isProtected")
  private Boolean isProtected = null;

  @JsonProperty("fileName")
  private String fileName = null;

  @JsonProperty("size")
  private Long size = null;

  @JsonProperty("limitReached")
  private Boolean limitReached = null;

  @JsonProperty("creatorName")
  private String creatorName = null;

  @JsonProperty("createdAt")
  private DateTime createdAt = null;

  @JsonProperty("hasDownloadLimit")
  private Boolean hasDownloadLimit = null;

  @JsonProperty("mediaType")
  private String mediaType = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("creatorUsername")
  private String creatorUsername = null;

  @JsonProperty("expireAt")
  private DateTime expireAt = null;

  @JsonProperty("notes")
  private String notes = null;

  @JsonProperty("isEncrypted")
  private Boolean isEncrypted = null;

  @JsonProperty("fileKey")
  private FileKey fileKey = null;

  @JsonProperty("privateKeyContainer")
  private PrivateKeyContainer privateKeyContainer = null;

  public PublicDownloadShare isProtected(Boolean isProtected) {
    this.isProtected = isProtected;
    return this;
  }

   /**
   * Is share protected by password
   * @return isProtected
  **/
  @Schema(required = true, description = "Is share protected by password")
  public Boolean isIsProtected() {
    return isProtected;
  }

  public void setIsProtected(Boolean isProtected) {
    this.isProtected = isProtected;
  }

  public PublicDownloadShare fileName(String fileName) {
    this.fileName = fileName;
    return this;
  }

   /**
   * File name
   * @return fileName
  **/
  @Schema(required = true, description = "File name")
  public String getFileName() {
    return fileName;
  }

  public void setFileName(String fileName) {
    this.fileName = fileName;
  }

  public PublicDownloadShare size(Long size) {
    this.size = size;
    return this;
  }

   /**
   * File size or container size not compressed (in bytes)
   * @return size
  **/
  @Schema(required = true, description = "File size or container size not compressed (in bytes)")
  public Long getSize() {
    return size;
  }

  public void setSize(Long size) {
    this.size = size;
  }

  public PublicDownloadShare limitReached(Boolean limitReached) {
    this.limitReached = limitReached;
    return this;
  }

   /**
   * Downloads limit reached
   * @return limitReached
  **/
  @Schema(required = true, description = "Downloads limit reached")
  public Boolean isLimitReached() {
    return limitReached;
  }

  public void setLimitReached(Boolean limitReached) {
    this.limitReached = limitReached;
  }

  public PublicDownloadShare creatorName(String creatorName) {
    this.creatorName = creatorName;
    return this;
  }

   /**
   * Creator name
   * @return creatorName
  **/
  @Schema(required = true, description = "Creator name")
  public String getCreatorName() {
    return creatorName;
  }

  public void setCreatorName(String creatorName) {
    this.creatorName = creatorName;
  }

  public PublicDownloadShare createdAt(DateTime createdAt) {
    this.createdAt = createdAt;
    return this;
  }

   /**
   * Creation date
   * @return createdAt
  **/
  @Schema(required = true, description = "Creation date")
  public DateTime getCreatedAt() {
    return createdAt;
  }

  public void setCreatedAt(DateTime createdAt) {
    this.createdAt = createdAt;
  }

  public PublicDownloadShare hasDownloadLimit(Boolean hasDownloadLimit) {
    this.hasDownloadLimit = hasDownloadLimit;
    return this;
  }

   /**
   * &amp;#128640; Since v4.11.0  Determines whether Download Share has a limit for amount of downloads
   * @return hasDownloadLimit
  **/
  @Schema(required = true, description = "&#128640; Since v4.11.0  Determines whether Download Share has a limit for amount of downloads")
  public Boolean isHasDownloadLimit() {
    return hasDownloadLimit;
  }

  public void setHasDownloadLimit(Boolean hasDownloadLimit) {
    this.hasDownloadLimit = hasDownloadLimit;
  }

  public PublicDownloadShare mediaType(String mediaType) {
    this.mediaType = mediaType;
    return this;
  }

   /**
   * &amp;#128640; Since v4.11.0  * &#x60;application/zip&#x60; (for folders and rooms)  * actual file media type (for files only)
   * @return mediaType
  **/
  @Schema(required = true, description = "&#128640; Since v4.11.0  * `application/zip` (for folders and rooms)  * actual file media type (for files only)")
  public String getMediaType() {
    return mediaType;
  }

  public void setMediaType(String mediaType) {
    this.mediaType = mediaType;
  }

  public PublicDownloadShare name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Share display name (alias name)
   * @return name
  **/
  @Schema(description = "Share display name (alias name)")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public PublicDownloadShare creatorUsername(String creatorUsername) {
    this.creatorUsername = creatorUsername;
    return this;
  }

   /**
   * Creator username
   * @return creatorUsername
  **/
  @Schema(description = "Creator username")
  public String getCreatorUsername() {
    return creatorUsername;
  }

  public void setCreatorUsername(String creatorUsername) {
    this.creatorUsername = creatorUsername;
  }

  public PublicDownloadShare expireAt(DateTime expireAt) {
    this.expireAt = expireAt;
    return this;
  }

   /**
   * Expiration date
   * @return expireAt
  **/
  @Schema(description = "Expiration date")
  public DateTime getExpireAt() {
    return expireAt;
  }

  public void setExpireAt(DateTime expireAt) {
    this.expireAt = expireAt;
  }

  public PublicDownloadShare notes(String notes) {
    this.notes = notes;
    return this;
  }

   /**
   * User notes
   * @return notes
  **/
  @Schema(description = "User notes")
  public String getNotes() {
    return notes;
  }

  public void setNotes(String notes) {
    this.notes = notes;
  }

  public PublicDownloadShare isEncrypted(Boolean isEncrypted) {
    this.isEncrypted = isEncrypted;
    return this;
  }

   /**
   * Encryption state
   * @return isEncrypted
  **/
  @Schema(description = "Encryption state")
  public Boolean isIsEncrypted() {
    return isEncrypted;
  }

  public void setIsEncrypted(Boolean isEncrypted) {
    this.isEncrypted = isEncrypted;
  }

  public PublicDownloadShare fileKey(FileKey fileKey) {
    this.fileKey = fileKey;
    return this;
  }

   /**
   * Get fileKey
   * @return fileKey
  **/
  @Schema(description = "")
  public FileKey getFileKey() {
    return fileKey;
  }

  public void setFileKey(FileKey fileKey) {
    this.fileKey = fileKey;
  }

  public PublicDownloadShare privateKeyContainer(PrivateKeyContainer privateKeyContainer) {
    this.privateKeyContainer = privateKeyContainer;
    return this;
  }

   /**
   * Get privateKeyContainer
   * @return privateKeyContainer
  **/
  @Schema(description = "")
  public PrivateKeyContainer getPrivateKeyContainer() {
    return privateKeyContainer;
  }

  public void setPrivateKeyContainer(PrivateKeyContainer privateKeyContainer) {
    this.privateKeyContainer = privateKeyContainer;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PublicDownloadShare publicDownloadShare = (PublicDownloadShare) o;
    return Objects.equals(this.isProtected, publicDownloadShare.isProtected) &&
        Objects.equals(this.fileName, publicDownloadShare.fileName) &&
        Objects.equals(this.size, publicDownloadShare.size) &&
        Objects.equals(this.limitReached, publicDownloadShare.limitReached) &&
        Objects.equals(this.creatorName, publicDownloadShare.creatorName) &&
        Objects.equals(this.createdAt, publicDownloadShare.createdAt) &&
        Objects.equals(this.hasDownloadLimit, publicDownloadShare.hasDownloadLimit) &&
        Objects.equals(this.mediaType, publicDownloadShare.mediaType) &&
        Objects.equals(this.name, publicDownloadShare.name) &&
        Objects.equals(this.creatorUsername, publicDownloadShare.creatorUsername) &&
        Objects.equals(this.expireAt, publicDownloadShare.expireAt) &&
        Objects.equals(this.notes, publicDownloadShare.notes) &&
        Objects.equals(this.isEncrypted, publicDownloadShare.isEncrypted) &&
        Objects.equals(this.fileKey, publicDownloadShare.fileKey) &&
        Objects.equals(this.privateKeyContainer, publicDownloadShare.privateKeyContainer);
  }

  @Override
  public int hashCode() {
    return Objects.hash(isProtected, fileName, size, limitReached, creatorName, createdAt, hasDownloadLimit, mediaType, name, creatorUsername, expireAt, notes, isEncrypted, fileKey, privateKeyContainer);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PublicDownloadShare {\n");
    
    sb.append("    isProtected: ").append(toIndentedString(isProtected)).append("\n");
    sb.append("    fileName: ").append(toIndentedString(fileName)).append("\n");
    sb.append("    size: ").append(toIndentedString(size)).append("\n");
    sb.append("    limitReached: ").append(toIndentedString(limitReached)).append("\n");
    sb.append("    creatorName: ").append(toIndentedString(creatorName)).append("\n");
    sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
    sb.append("    hasDownloadLimit: ").append(toIndentedString(hasDownloadLimit)).append("\n");
    sb.append("    mediaType: ").append(toIndentedString(mediaType)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    creatorUsername: ").append(toIndentedString(creatorUsername)).append("\n");
    sb.append("    expireAt: ").append(toIndentedString(expireAt)).append("\n");
    sb.append("    notes: ").append(toIndentedString(notes)).append("\n");
    sb.append("    isEncrypted: ").append(toIndentedString(isEncrypted)).append("\n");
    sb.append("    fileKey: ").append(toIndentedString(fileKey)).append("\n");
    sb.append("    privateKeyContainer: ").append(toIndentedString(privateKeyContainer)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
